<template>
  <div class="employees-container">
    <div class="app-contioner">
      <!-- 页面 -->
      <el-card>
        <el-tabs v-model="active">
          <el-tab-pane :label="登录账户设置" :name="acc">
            <LoginSetting :user-data="userData" /></el-tab-pane>
          <el-tab-pane :label="个人详情" :name="detail">
            <UserInfo :user-data="userData" /></el-tab-pane>
        </el-tabs>
      </el-card>
    </div>
  </div>
</template>

<script>
import LoginSetting from './component/login-setting'
import UserInfo from './component/user-Info'
import { getUserDetailById } from '@/api/user'
export default {
  components: {
    LoginSetting,
    UserInfo
  },
  data () {
    return {
      active: 'detail',
      userData: {}
    }
  },
  created () {
    this.getUserData()
  },
  methods: {
    async getUserData () {
      const res = await getUserDetailById(this.$router.params.id)
      this.userData = res
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
